<%@page import="com.xxb.entity.Admin"%>
<%@page import="com.xxb.dao.AdminDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
	response.setCharacterEncoding("UTF-8");
	
	String username = request.getParameter("username");
	String userpwd = request.getParameter("userpwd");
	
	Admin admin = new AdminDao().login(username,userpwd);
	if(admin == null){
		response.sendRedirect("index.jsp?code=100");
	}else{
		session.setAttribute("currentAdmin",admin);
		response.sendRedirect("main.jsp");
	}
 %>
